s = 'abcdef'
for c in s:
    print(c)

print('--------------')
n = 5
while n > 0:
    n -= 1
    if n == 2:
        break
    print(n)
print('循环结束。')
print('--------------')
n = 5
while n > 0:
    n -= 1
    if n == 2:
        continue#即当n=2时不进行输出
    print(n)
print('循环结束。')

print("--------------")
for letter in 'Runoob':     # 第一个实例
   if letter == 'o':        # 字母为 o 时跳过输出
      continue
   print ('当前字母 :', letter)

for letter in 'Runoob':     # 第一个实例
   if letter == 'b':
      break
   print ('当前字母为 :', letter)

print('--------------')
for n in range(2, 10):
    for x in range(2, n):
        if n % x == 0:
            print(n, '等于', x, '*', n//x)
            break
    else:
        # 循环中没有找到元素
        print(n, ' 是质数')
print('--------------')
for i in range(5):
	print(i)

print('--------------')
for i in range(5,9) :
    print(i)

for i in range(0, 10, 3) :
    print(i)

print('--------------')

for n in range(4, 20):
    for x in range(2, n):
        if n % x == 0:
            print(n, '等于', x, '*', n//x)
            break
    else:
        # 循环中没有找到元素
        print(n, ' 是质数')


s = 'abcdef'
for i in range(len(s)):
    print(s[i])